﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace FwProject.Migrations
{
    public partial class Add_SettlementAccount_To_fwyg : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "AccountName",
                table: "DepositInfo",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AccountNo",
                table: "DepositInfo",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "AgentPeoper",
                table: "DepositInfo",
                nullable: true);

            migrationBuilder.AddColumn<long>(
                name: "AgentPeoperUserId",
                table: "DepositInfo",
                nullable: true);

            migrationBuilder.AddColumn<Guid>(
                name: "CapitalAccountId",
                table: "DepositInfo",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "RemarkContent",
                table: "DepositInfo",
                nullable: true);

            migrationBuilder.CreateTable(
                name: "settlement_account",
                columns: table => new
                {
                    Id = table.Column<Guid>(nullable: false),
                    CreationTime = table.Column<DateTime>(nullable: false),
                    CreatorUserId = table.Column<long>(nullable: true),
                    LastModificationTime = table.Column<DateTime>(nullable: true),
                    LastModifierUserId = table.Column<long>(nullable: true),
                    IsDeleted = table.Column<bool>(nullable: false),
                    DeleterUserId = table.Column<long>(nullable: true),
                    DeletionTime = table.Column<DateTime>(nullable: true),
                    Number = table.Column<string>(nullable: true),
                    Name = table.Column<string>(nullable: true),
                    InitialDate = table.Column<DateTime>(nullable: true),
                    InitialAmount = table.Column<decimal>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_settlement_account", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "settlement_account");

            migrationBuilder.DropColumn(
                name: "AccountName",
                table: "DepositInfo");

            migrationBuilder.DropColumn(
                name: "AccountNo",
                table: "DepositInfo");

            migrationBuilder.DropColumn(
                name: "AgentPeoper",
                table: "DepositInfo");

            migrationBuilder.DropColumn(
                name: "AgentPeoperUserId",
                table: "DepositInfo");

            migrationBuilder.DropColumn(
                name: "CapitalAccountId",
                table: "DepositInfo");

            migrationBuilder.DropColumn(
                name: "RemarkContent",
                table: "DepositInfo");
        }
    }
}
